package ch3;

public class StrTest3 {

	public static void main(String[] args) {
		String s = "我喜欢java";
		System.out.println(s.length());
		byte b[] = s.getBytes();
		for (byte bb : b)
			System.out.print(bb + " ");
		System.out.println();
		char[] c = s.toCharArray();
		for (char cc : c)
			System.out.print(cc + "=" + (int) cc + " ");
		System.out.println(">>>>>>>>>>>>>>>>.");
		String s1 = "java";
		String s2 = "ja";
		s2 = s2 + "va";
		System.out.println(s1.equals(s2));

		System.out.println(s1 == s2);
		s1 = "This is java61班";
		String s3 = s1.substring(5);
		System.out.println(s3);// is java61班
		String s4 = s1.substring(5, 12);

		System.out.println(s4);// is java

		String s6 = "aabbccaadsddfslfaaasdfklsdfsd";
		String[] s7 = s6.split("aa");
		System.out.println("分割后的长度：");
		System.out.println(s7.length);
		for (String s8 : s7)
			System.out.println(s8.length() + ":" + s8);
	}

}
